|
ARD2
1.00 for Rev B. Hardware
Airbag Reference Demonstrator using MPC5604P
|
00001 00002 /* 00003 * 00004 * FILE : MPC5604P_HWInit.h 00005 * 00006 * DESCRIPTION: 00007 * This file contains all MPC5604P derivative needed initializations, 00008 * and all initializations for the MPC5604P boards which are supported. 00009 * This includes setting up the External Bus Interface to allow access to 00010 * memory on the external bus, and ensuring there is a valid entry in the 00011 * MMU for the external memory access. 00012 */ 00013 00014 #ifndef _MPC5604P_HWINIT_H_ 00015 #define _MPC5604P_HWINIT_H_ 00016 00017 /*----------------------------------------------------------------------------*/ 00018 /* Includes */ 00019 /*----------------------------------------------------------------------------*/ 00020 00021 #ifdef __cplusplus 00022 extern "C" { 00023 #endif 00024 00025 /*******************************************************/ 00026 /* MPC5604P derivative specific hardware initialization */ 00027 /*******************************************************/ 00028 00029 __asm void INIT_Derivative(void); 00030 00031 /*******************************************************/ 00032 /* MPC5604P boards specific hardware initializations */ 00033 /*******************************************************/ 00034 00035 /*----------------------------------------------------------------------------*/ 00036 /* Used Board selection */ 00037 /*----------------------------------------------------------------------------*/ 00038 00039 /* Supported Boards */ 00040 #define NO_EXTERNAL_MEMORY 0 00041 #define MPC5604PDEMO_AXM_0321 1 00042 00043 /* Used board */ 00044 #define INIT_USED_BOARD NO_EXTERNAL_MEMORY 00045 00046 #ifndef INIT_USED_BOARD 00047 #pragma error INIT_USED_BOARD should be defined ! 00048 #endif 00049 00050 /*----------------------------------------------------------------------------*/ 00051 /* Function declarations */ 00052 /*----------------------------------------------------------------------------*/ 00053 00054 /* call this function to setup the external bus, 00055 chip selects and MMU entries for the selected board 00056 */ 00057 __asm void INIT_ExternalBusAndMemory(void); 00058 00059 /*----------------------------------------------------------------------------*/ 00060 /* MMU Table Entries Defines */ 00061 /*----------------------------------------------------------------------------*/ 00062 00069 #define MAS0_VALUE(eselcam) ((unsigned long)(0x10000000 | (eselcam << 16))) 00070 00080 #define MAS1_VALUE(valid, iprot, tid, ts, tsize) \ 00081 ((unsigned long)((valid << 31) | (iprot << 30) | (tid << 16) | (ts << 12) | (tsize << 8))) 00082 00084 #define V_INVALID 0 00085 #define V_VALID 1 00086 00088 #define IPROT_NOTPROTECTED 0 00089 #define IPROT_PROTECTED 1 00090 00092 #define TID_GLOBAL 0 00093 00095 #define TSIZE_4KB 1 00096 #define TSIZE_16KB 2 00097 #define TSIZE_64KB 3 00098 #define TSIZE_256KB 4 00099 #define TSIZE_1MB 5 00100 #define TSIZE_4MB 6 00101 #define TSIZE_16MB 7 00102 #define TSIZE_64MB 8 00103 #define TSIZE_256MB 9 00104 00117 #define MAS2_FLAGS(sharen, w, i, m, g, e) \ 00118 ((unsigned long)((sharen << 9)| (w << 4)| (i << 3)| (m << 2)| (g << 1)| (e))) 00119 00121 #define SHARED_CACHE_STATE_NOT_USED 0 00122 00123 #define SHARED_CACHE_STATE_USED 1 00124 00126 #define WRITE_BACK 0 00127 00128 #define WRITE_THROUGH 1 00129 00131 #define CACHEABLE 0 00132 00133 #define CACHE_INHIBIT 1 00134 00136 #define MEM_COHERENCE_NREQ 0 00137 00138 #define MEM_COHENRECE_REQ 1 00139 00141 #define NOT_GUARDED 0 00142 00143 #define GUARDED 1 00144 00146 #define BIG_ENDIAN 0 00147 00148 #define LITTLE_ENDIAN 1 00149 00158 #define MAS3_FLAGS(permissions) ((unsigned long)(permissions)) 00159 00161 #define READ_WRITE_EXECUTE 0x3f 00162 00163 #define READ_EXECUTE 0x33 00164 00165 00166 #ifdef __cplusplus 00167 } 00168 #endif 00169 00170 #endif